const timeShow = function () {
  var d1 = new Date(); //获取到当前的时间
  var d1Ms = d1.getTime();
  var d2 = new Date("5 6,2022");
  var d2Ms = d2.getTime();
  var differMs = d2Ms - d1Ms; //相差的毫秒数
  if (differMs < 0) {
    return "0日0时0分";
  }
  var date = parseInt(differMs / (3600 * 24 * 1000)); //天
  var hours = parseInt((differMs % (3600 * 24 * 1000)) / (3600 * 1000)); //1小时=3600s
  var minutes = parseInt((differMs % (3600 * 1000)) / (60 * 1000)); //分钟
  this.date = date;
  this.hours = hours < 10 ? "0" + hours : hours;
  this.minutes = minutes < 10 ? "0" + minutes : minutes;
  return date + "日" + hours + "时" + minutes + "分";
};

export default timeShow;
